using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;

namespace WindowsFormsApplication1
{
    public partial class rptTKChatLuongSVTheoPhai : DevExpress.XtraReports.UI.XtraReport
    {
        int STT = 0;
        XRSummary TongSX;
        XRSummary TongGioi;
        XRSummary TongKha;
        XRSummary TongTBKha;
        XRSummary TongTB;
        XRSummary TongYeu;
        XRSummary TongKem;
        XRSummary TongCong;
        public rptTKChatLuongSVTheoPhai()
        {
            InitializeComponent();
        }

        private void colSTT_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            STT++;
            colSTT.Text = STT.ToString();
        }

        public void BindData(string namhoc)
        {
            colNamhoc.Text = namhoc;
            colPhai.DataBindings.Add("Text", DataSource, "Phai");
            colXSac.DataBindings.Add("Text", DataSource, "TongSX");
            colGIoi.DataBindings.Add("Text", DataSource, "TongGioi");
            colKha.DataBindings.Add("Text", DataSource, "TongKha");
            colTBKha.DataBindings.Add("Text", DataSource, "TongTBKha");
            colTB.DataBindings.Add("Text", DataSource, "TongTB");
            colYeu.DataBindings.Add("Text", DataSource, "TongYeu");
            colKem.DataBindings.Add("Text", DataSource, "TongKem");
            colCong.DataBindings.Add("Text", DataSource, "TongsoSV");

            TongSX = new XRSummary();
            colTongXSac.DataBindings.AddRange(new XRBinding[] { new XRBinding("Text", null, "TongSX", "") });
            TongSX.Running = SummaryRunning.Report;
            colTongXSac.Summary = TongSX;

            TongGioi = new XRSummary();
            colTongGioi.DataBindings.AddRange(new XRBinding[] { new XRBinding("Text", null, "TongGioi", "") });
            TongGioi.Running = SummaryRunning.Report;
            colTongGioi.Summary = TongGioi;

            TongKha = new XRSummary();
            colTongKha.DataBindings.AddRange(new XRBinding[] { new XRBinding("Text", null, "TongKha", "") });
            TongKha.Running = SummaryRunning.Report;
            colTongKha.Summary = TongKha;

            TongTBKha = new XRSummary();
            colTongTBKha.DataBindings.AddRange(new XRBinding[] { new XRBinding("Text", null, "TongTBKha", "") });
            TongTBKha.Running = SummaryRunning.Report;
            colTongTBKha.Summary = TongTBKha;

            TongTB = new XRSummary();
            colTongTB.DataBindings.AddRange(new XRBinding[] { new XRBinding("Text", null, "TongTB", "") });
            TongTB.Running = SummaryRunning.Report;
            colTongTB.Summary = TongTB;

            TongYeu = new XRSummary();
            colTongYeu.DataBindings.AddRange(new XRBinding[] { new XRBinding("Text", null, "TongYeu", "") });
            TongYeu.Running = SummaryRunning.Report;
            colTongYeu.Summary = TongYeu;

            TongKem = new XRSummary();
            ColTongKem.DataBindings.AddRange(new XRBinding[] { new XRBinding("Text", null, "TongKem", "") });
            TongKem.Running = SummaryRunning.Report;
            ColTongKem.Summary = TongKem;

            TongCong = new XRSummary();
            colTongCong.DataBindings.AddRange(new XRBinding[] { new XRBinding("Text", null, "TongsoSV", "") });
            TongCong.Running = SummaryRunning.Report;
            colTongCong.Summary = TongCong;
        }


    }
}
